Add field type evaluation for form designer to ROADMAP_DESIGNER.md#536
Add field type evaluation for form designer to ROADMAP_DESIGNER.md#536
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Evaluates @object-ui/fields field types for form designer integration. Adds comprehensive Section 10 covering: - Complete inventory of all 36 field widgets with type/renderer mapping - Gap analysis per designer (DataModel, Page, View) - Proposed DESIGNER_FIELD_TYPES constant - Integration plan per designer component - Type safety recommendations (FieldTypeName, DataModelField) - Priority phasing with effort estimates Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive Section 10 "Field Type Evaluation for Form Designer" to ROADMAP_DESIGNER.md, documenting the gap between available field widgets in @object-ui/fields (37 field types) and their limited exposure in designer UIs. The section provides a complete field type inventory, gap analysis for each designer component, and a detailed integration plan with prioritized implementation tasks.
Changes:
- Complete catalog of all field types with their widget files, type interfaces, cell renderers, and current designer availability across 9 categories
- Gap analysis identifying missing field type selectors in DataModelDesigner, limited palette in PageDesigner (14 vs 37 types), and plain text badges in ViewDesigner
- Proposed DESIGNER_FIELD_TYPES constant with Lucide icons, categories, and descriptions for centralized field type registry
- Type safety recommendations including FieldTypeName extraction and DataModelField.type strengthening
- Phased implementation plan with 7-9.5 dev-days effort estimate
|
|
||
| #### DataModelDesigner | ||
|
|
||
| **Current state:** When a field is added via `handleAddField` (`DataModelDesigner.tsx:258`), |
There was a problem hiding this comment.
The reference to line 258 is slightly inaccurate. The actual line where the type is hardcoded to 'text' is line 260 in DataModelDesigner.tsx. Please update the line reference from 258 to 260.
| **Current state:** When a field is added via `handleAddField` (`DataModelDesigner.tsx:258`), | |
| **Current state:** When a field is added via `handleAddField` (`DataModelDesigner.tsx:260`), |
| 3. **Update `mapFieldTypeToFormType` in `@object-ui/fields`** to cover all 36 | ||
| field types (currently missing: `color`, `slider`, `rating`, `code`, `avatar`, | ||
| `address`, `geolocation`, `signature`, `qrcode`). |
There was a problem hiding this comment.
The list of missing field types in mapFieldTypeToFormType is incomplete. Based on the code in @object-ui/fields/src/index.tsx (lines 583-629), the function currently maps 24 out of 37 field types. The missing types are: user, object, vector, grid, color, slider, rating, code, avatar, address, geolocation, signature, and qrcode (13 types total, not 9). Please update the list to include all missing types or clarify which subset is considered priority.
| items: DESIGNER_FIELD_TYPES.map(ft => ({ | ||
| type: `field:${ft.type}`, | ||
| label: ft.label, | ||
| icon: ft.icon.name, |
There was a problem hiding this comment.
The proposed palette addition code has a type mismatch. The code uses icon: ft.icon.name where ft.icon is a LucideIcon component type. However, DesignerPaletteItem.icon is typed as string (see @object-ui/types/designer.ts:118). LucideIcon components don't have a .name property that provides a string identifier. Consider one of these alternatives: (1) use the field type name as the icon identifier (icon: ft.type), (2) add a separate iconName field to DesignerFieldTypeOption, or (3) if you need the actual icon component, you'll need to change how palette items handle icons in the designer implementation.
| icon: ft.icon.name, | |
| icon: ft.type, |
|
|
||
| ### 10.1 Overview | ||
|
|
||
| The `@object-ui/fields` package provides **36 field widget implementations** covering |
There was a problem hiding this comment.
The document states "36 field widget implementations" but the actual count from @object-ui/fields/src/widgets/ directory and the FieldMetadata union type in @object-ui/types/field-types.ts is 37 field types (including all types listed in the tables below). Please update this number to 37.
| The `@object-ui/fields` package provides **36 field widget implementations** covering | |
| The `@object-ui/fields` package provides **37 field widget implementations** covering |
|
|
||
| The `@object-ui/fields` package provides **36 field widget implementations** covering | ||
| text, numeric, date/time, selection, file, contact, computed, and visual field types. | ||
| The `@object-ui/types` package defines **35 typed metadata interfaces** in |
There was a problem hiding this comment.
The document states "35 typed metadata interfaces" but the FieldMetadata union type in @object-ui/types/field-types.ts actually contains 37 interface types (lines 570-607). Please update this number to 37 to match the actual implementation.
| The `@object-ui/types` package defines **35 typed metadata interfaces** in | |
| The `@object-ui/types` package defines **37 typed metadata interfaces** in |
@object-ui/fieldsprovides 36 field widgets but the designer components expose only a fraction of them. This adds a comprehensive evaluation (Section 10) to the design doc covering the gap and integration path.Field Type Inventory (10.2)
Gap Analysis (10.3)
'text',DataModelField.typeis genericstringnot a unionDEFAULT_PALETTEhas 14 generic items (e.g.input,checkbox) instead of leveraging the 36@object-ui/fieldswidgetsProposed
DESIGNER_FIELD_TYPESConstant (10.4)Centralized field type registry with Lucide icons, categories, and descriptions for use across all designers:
Type Safety Recommendations (10.6)
FieldTypeNamefrom theFieldMetadataunion discriminantDataModelField.typefromstring→FieldTypeNamemapFieldTypeToFormTypefor missing 9 typesIntegration Plan & Phasing (10.5, 10.7)
Per-designer implementation points with P0–P3 prioritization, estimated at 7–9.5 dev-days total.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.